package src.dump;

import java.util.ArrayList;
import src.dump.StockInfo;

/**
 **  Using daily price and volume, judge if is the buying point
 **  @author honghua.he 2013-12-30 下午22:08:51
 */

public class BuyingPoint {

private static int timeInterval = 22;

public static boolean isBuyingPoint(ArrayList<StockInfo> stockInfoList) {
    return true;
}

public static ArrayList getRiseFallFlag(ArrayList<StockInfo> stockInfoList) {
    ArrayList riseFallFlag = new ArrayList(stockInfoList.size());
    for (int i = 0; i < stockInfoList.size(); ++i) {
        if (Rise(stockInfoList.get(i), stockInfoList.get(i-1))) {
            riseFallFlag.set(i, 1);
        } else {
            riseFallFlag.set(i, -1);
        }
    }
    
    return riseFallFlag;
}

public static boolean Rise(StockInfo stockInfo1, StockInfo stockInfo2) {
    if (stockInfo1.getClosePrice() > stockInfo1.getClosePrice()) {
        return true;
    } else {
        return false;
    }
}

}

